package com.taxshare.seller.controller;

import com.taxshare.mybatis.pager.PageRequest;
import com.taxshare.response.beans.Response;
import com.taxshare.seller.entity.QuotaEntity;
import com.taxshare.seller.service.QuotaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: QuotaController
 * @Description:
 * @author: lpp
 * @date: 2024/10/21 10:36
 */
@RestController
@RequestMapping(value = "/quota")
@Api(tags = "授信额度")
public class QuotaController {
    @Autowired
    private QuotaService quotaService;

    @ApiOperation(value = "发票号码段查询", notes = "发票号码段管理")
    @PostMapping("/list")
    public Response query(@RequestBody PageRequest<QuotaEntity> param) {
        return quotaService.query(param);
    }


    /**
     * 查询额度
     * @param param
     * @return
     */
    @PostMapping(value="/CXSXED")
    @ResponseBody
    public Map CXSXED(@RequestParam Map<String, Object> param){
        param.put("nsrsbh","91140000731914164T");
        Map map = quotaService.CXSXED(param);
        return map;
    }

    /**
     * 下载/退回授权额度
     * @return
     */
    @PostMapping(value="/XZTHSXED")
    @ResponseBody
    public Map XZTHSXED(@RequestParam Map<String, Object> param){
        param.put("nsrsbh","91140000731914164T");
        Map map = quotaService.XZTHSXED(param);
        return map;
    }


}


